package com.companyName.common.redis;

import org.apache.commons.pool2.impl.GenericObjectPoolConfig;

public class RedisConfig {
	
	/**
	 *  ip及端口地址 ，逗号分隔地址 示例：10.100.1.75:7000,10.100.1.75:7001,10.100.1.75:7002
	 */
	private String address; 
	
	/**
	 * 获取连接时的最大等待毫秒数
	 */
	private long maxWaitMillis = GenericObjectPoolConfig.DEFAULT_MAX_WAIT_MILLIS;
	
	/**
	 * 最大连接数
	 */
	private int maxTotal = GenericObjectPoolConfig.DEFAULT_MAX_TOTAL;
	
	/**
	 * 最小空闲
	 */
	private int minIdle = GenericObjectPoolConfig.DEFAULT_MIN_IDLE;
	
	/**
	 * 最大空闲
	 */
	private int maxIdle = GenericObjectPoolConfig.DEFAULT_MAX_IDLE;
	
	/**
	 * 连接超时时间
	 */
	private int timeout = 2000;
	
	/**
	 * 超时最大重试次数
	 */
	private int maxRedirections;
	
	/**
	 * 是否集群
	 */
	private boolean isCluster = true;

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public long getMaxWaitMillis() {
		return maxWaitMillis;
	}

	public void setMaxWaitMillis(long maxWaitMillis) {
		this.maxWaitMillis = maxWaitMillis;
	}

	public int getMaxTotal() {
		return maxTotal;
	}

	public void setMaxTotal(int maxTotal) {
		this.maxTotal = maxTotal;
	}

	public int getMinIdle() {
		return minIdle;
	}

	public void setMinIdle(int minIdle) {
		this.minIdle = minIdle;
	}

	public int getMaxIdle() {
		return maxIdle;
	}

	public void setMaxIdle(int maxIdle) {
		this.maxIdle = maxIdle;
	}

	public int getTimeout() {
		return timeout;
	}

	public void setTimeout(int timeout) {
		this.timeout = timeout;
	}

	public int getMaxRedirections() {
		return maxRedirections;
	}

	public void setMaxRedirections(int maxRedirections) {
		this.maxRedirections = maxRedirections;
	}

	public boolean isCluster() {
		return isCluster;
	}

	public void setIsCluster(boolean isCluster) {
		this.isCluster = isCluster;
	}
	
	
}
